package com.yeyks.common.em.mattress;

public enum OrderInfoMattressOrderTypeEnum {

    MATTRESS(1, "mattress");

    int value;
    String desc;

    OrderInfoMattressOrderTypeEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer value() {
        return this.value;
    }

    public String desc() {
        return this.desc;
    }

    public static String getDesc(int value) {
        OrderInfoMattressOrderTypeEnum[] orderInfoMattressEnums = values();
        for (OrderInfoMattressOrderTypeEnum orderInfoMattressEnum : orderInfoMattressEnums) {
            if (orderInfoMattressEnum.value() == value) {
                return orderInfoMattressEnum.desc();
            }
        }
        return null;
    }

    public static Integer getValue(String desc) {
        OrderInfoMattressOrderTypeEnum[] orderInfoMattressEnums = values();
        for (OrderInfoMattressOrderTypeEnum orderInfoMattressEnum : orderInfoMattressEnums) {
            if (orderInfoMattressEnum.desc().equals(desc)) {
                return orderInfoMattressEnum.value();
            }
        }
        return null;
    }

}
